package edu.zju.gis.dldsj.service;

import edu.zju.gis.dldsj.base.BaseService;
import edu.zju.gis.dldsj.entity.ParallelModel;
import edu.zju.gis.dldsj.entity.ParallelModelWithBLOBs;
import org.json.JSONArray;

import java.util.Collection;
import java.util.List;

/**
 * @author yanlo yanlong_lee@qq.com
 * @version 1.0 2018/08/01
 */
public interface ParallelModelService extends BaseService<ParallelModelWithBLOBs, String> {
    List<ParallelModel> getByIdList(Collection<String> idList);

    default String getCmd(String artifactId, String jobName, JSONArray params) {
        ParallelModelWithBLOBs model = select(artifactId);
        return getCmd(model, jobName, params);
    }

    String getCmd(ParallelModelWithBLOBs model, String jobName, JSONArray params);
}
